package com.kool.kadmin.common.util;

/**
 * 分页工具
 *
 * @author luyu
 */
public class PaginatorUtil {
    /**
     * 计算mysql 分页的offset
     *
     * @param currentPage
     * @param pageSize
     * @return
     */
    public static int calculateOffset(int currentPage, int pageSize) {
        return (currentPage - 1) * pageSize;
    }
}
